<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式布局</title>

    <style>
      .nav {
            display: flex;
            flex-wrap: wrap;
            width: 400px;
            height: 300px;
            background-color: lightyellow;
        }

      .item {
            width: 100px;
            height: 50px;
            background-color: lightgreen;
            margin: 10px;
        }
    </style>
</head>
<body>
    <div class="nav">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>
</html>